package JavaCore.streams;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;

/**
 *
 */
public class CollectingResults {

	public static void main(String[] args) throws IOException {
		String context = new String(Files.readAllBytes(Paths.get("C:\\Users\\Administrator\\Desktop\\�½��ı��ĵ�.txt")),
				StandardCharsets.UTF_8);
		List<String> words = Arrays.asList(context.split("\\PL+"));

		words.stream().forEach(e -> System.out.print(e + " "));
		words.stream().forEach(System.out::println);
	}

}
